Skip to content

Conversation

jakevdp
Copy link
Contributor

@jakevdp jakevdp commented Nov 14, 2024

This avoids a bunch of warning log-spam, e.g.

$ ARRAY_API_TESTS_MODULE=numpy pytest -n auto array_api_tests

...

  /Users/vanderplas/github/array-api-tests/reporting.py:44: UserWarning: <function round at 0x105f66f70> (of type <class 'numpy._ArrayFunctionDispatcher'>) is not JSON-serializable. Using the repr instead.
    warnings.warn(f"{o!r} (of type {type(o)}) is not JSON-serializable. Using the repr instead.")

...

There are hundreds of such warnings that this change silences.

@jakevdp jakevdp requested a review from asmeurer November 14, 2024 22:43
@asmeurer asmeurer merged commit a3f3f37 into data-apis:master Nov 14, 2024
4 checks passed
@jakevdp jakevdp deleted the callable-repr branch November 15, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants